package com.blackcat.annotation.bean.bean;

import com.blackcat.annotation.configuration.config.MyConfig;
import lombok.Data;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

/**
 * <p> 描述 ：Bean
 * @author : blackcat
 * @date : 2020/5/23 16:06
 * @see MyConfig  需要看MyConfig
 *
 */
@Data
public class User {
	private String name="zhang";

	public void init(){
		System.out.println("init");
	}

	public void destroy(){
		System.out.println("destroy");
	}

	/*@PostConstruct
	public void PostConstruct(){
		System.out.println("@PostConstruct将在依赖注入完成后被自动调用");
	}

	@PreDestroy
	public void PreDestroy(){
		System.out.println("XXX 正在被容器删除");
	}*/
}
